	<script>
// 顶部tab+页面切换
import { defineComponent} from 'vue'
export default defineComponent({
	name: 'WeworkQr'
})
</script>
<script setup>
import {formatDate} from '@/utils'
import { reqClientList } from '@/api'
import { customerDataList } from '@/data'
import { deepClone, isEmpty, customerStatus } from '@/utils'
import MyIcon from '@/components/my-icon/index.vue'
import { toRaw } from '@vue/reactivity';
import { ref } from 'vue'
const isRefresh = ref(false)
const handleRefresh = () => {
  isRefresh.value = false
  isRefresh.value = true
}


const total = ref(0)
const pageNo = ref(1)
const queryForm = ref({
	qrId: ''
})

const tableData = ref()

const getData = async(obj)=>{
	let queryForm = {
		page:pageNo.value,
		size:10
	}
	if(obj) {
		queryForm.page = 1
		queryForm = Object.assign(queryForm,toRaw(obj))
	}
	const r = await reqClientList(queryForm)
	if (r){
		tableData.value = r.data.item
    total.value = r.data.count
    handleRefresh()
	}
	
}
getData()

const multipleTableRef = ref()
const multipleSelection = ref([])
const selectAll = ref(false)


const exportExcel = () => {
	console.log('导出excel')
}
const handleCurrentChange = (val) => {
	pageNo.value = val
	getData()
}
const handleSelectAll = () => {
	multipleTableRef.value.clearSelection()
	if (selectAll.value) {
		tableData.value.forEach((row) => {
			multipleTableRef.value.toggleRowSelection(row, undefined)
		})
	}
}

const handleSelectionChange = (val) => {
	multipleSelection.value = val
	if (multipleSelection.value.length == qrDataSetList.value.length) {
		selectAll.value = true
	} else {
		selectAll.value = false
	}
}
const emits = defineEmits(['showDetail'])
defineExpose({
  getData
});
</script>
<template>
<div v-if="isRefresh">
  <div class="a-mt20 a-p2016 app-container-radius">共
    <span class="app-success-font">3</span>
    个客服</div>
  <el-card class="a-m2016 a-card a-mt0">
    <template #header>
      <div class="app-flex-left">
							<el-avatar class="cho-margin" shape="square" :size="30" :src="tableData[0].avatar" />
							<span class="app-gap-words-left">
								{{ tableData[0].name }}
							</span>
						</div>
    </template>
    <div v-for="o in 4" :key="o" class="text item">{{ 'List item ' + o }}</div>
  </el-card>
    <el-card class="a-m2016 a-card a-mt0">
    <template #header>
      <div class="app-flex-left">
							<el-avatar class="cho-margin" shape="square" :size="30" :src="tableData[0].avatar" />
							<span class="app-gap-words-left">
								{{ tableData[0].name }}
							</span>
						</div>
    </template>
    <div v-for="o in 4" :key="o" class="text item">{{ 'List item ' + o }}</div>
  </el-card>
  </div>
</template>
<style lang="scss">
@import url('../../../../../style/app-component.scss');
@import '../../../../../style/mixin.scss';
</style>